From 13805fce5aa6303b92cba83a9c7bb4b8f80f5d0a Mon Sep 17 00:00:00 2001 From: Alvaro Fernandez Rojas Date: Wed, 17 Dec 2025 08:52:47 +0100 Subject: [PATCH] odhcp6c: reset res variable on INIT state res variable is used on multiple states and it can be modified from the default value during the argument parsing, so it should be properly reset at INIT state. Signed-off-by: Alvaro Fernandez Rojas --- src/odhcp6c.c | 1 + 1 file changed, 1 insertion(+) diff --git a/src/odhcp6c.c b/src/odhcp6c.c index d859e90..123d9d3 100644 --- a/src/odhcp6c.c +++ b/src/odhcp6c.c @@ -518,6 +518,7 @@ int main(_o_unused int argc, char* const argv[]) odhcp6c_clear_state(STATE_SIP_FQDN); odhcp6c_clear_state(STATE_CAPT_PORT_DHCPV6); bound = false; + res = -1; size_t oro_len = 0; odhcp6c_get_state(STATE_ORO, &oro_len); -- 2.30.2